package com.bnq.logc.work

import com.bnq.logc.Logc
import com.bnq.logc.upload.UploadFileManager
import com.bnq.logc.utils.DateUtil
import com.bnq.logc.utils.ExecutorUtil.Task

class ThreadUploadTask : Task() {
    override fun execute() {
        val key = System.currentTimeMillis().toString()
        Logc.i("UploadWorker",">>>> ThreadUploadTask -> execute start key:$key, ${DateUtil.currentDateTimeString()}")
        UploadFileManager.checkAndUploadFileLast7{ checkUploadResult ->
            Logc.i("UploadWorker","<<<< ThreadUploadTask -> execute end key:$key, ${DateUtil.currentDateTimeString()}, uploadResult:${checkUploadResult.getUploadSuccessRateString()}, e: ${checkUploadResult.e},  isUploadLog: ${checkUploadResult.isUploadLog}, uploadError: ${checkUploadResult.getSimpleUploadErrorInfoString()}")
        }
    }
}